import java.util.Arrays;

/**
 * @author LKQ
 * @date 2022/2/22 14:35
 * @description
 */
public class Solution {
    public static void main(String[] args) {
        Solution solution = new Solution();
        solution.maximumProduct(new int[]{1,2,3,4});
    }
    public int maximumProduct(int[] nums) {
        Arrays.sort(nums);
        int n = nums.length;

        return Math.max(nums[0] * nums[1] * nums[n-1], nums[n-3] * nums[n-2] * nums[n-1]);
    }
}
